-- GENERATED SPELL FOR [Eclipsion Archmage] --


function spell0_19796(pUnit, Event) --@Ancient Fire,n/a--
pUnit:FullCastSpellOnTarget(37986,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19796', 5000, 1)
end

function spell1_19796(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(11829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19796', 11000, 1)
end

function spell2_19796(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(13878,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19796', 1500, 1)
end

function Sorts_19796(pUnit, Event)
local choix_sorts_19796 = math.random(0, 2)
if choix_sorts_19796 == 0 then
pUnit:RegisterEvent('spell0_19796', 1, 1)
end
if choix_sorts_19796 == 1 then
pUnit:RegisterEvent('spell1_19796', 1, 1)
end
if choix_sorts_19796 == 2 then
pUnit:RegisterEvent('spell2_19796', 1, 1)
end
end

function mob19796_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19796', math.random(1500, 3000), 1)
end

function mob19796_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19796_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19796_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19796, 1, 'mob19796_Action')
RegisterUnitEvent(19796, 2, 'mob19796_Leave')
RegisterUnitEvent(19796, 3, 'mob19796_Kill')
RegisterUnitEvent(19796, 4, 'mob19796_Die')
